//============================================================================
// Name        : RSA.hpp
// Author      : Azadeh Nematzadeh
// Version     :
// Copyright   :
// Description : RSA Header Definition
//============================================================================

#ifndef RSA_HPP_
#define RSA_HPP_

#include <string>
#include <iostream>
#include <botan/botan.h>
#include <botan/look_pk.h> // for get_kdf
#include <botan/rsa.h>

using namespace Botan;
class RSA {
public:
	Botan::RSA_PublicKey* publicKey;
	Botan::RSA_PrivateKey* privateKey;


	/*
	 * This is a constructor for this class
	 */
	RSA();
	/*
	 * This function loads private key from file to variable privateKey.
	 */
	void loadPublicKey(std::string);
	/*
	 * This function loads private key from file to variable privateKey.
	 */
	void loadPrivateKey(std::string,std::string);
	/*
	 * This function encrypts an array of string with public key.
	 */
	void encrypt(byte * vect_message, int size ,PK_Encrypting_Key* key, SecureVector<byte> *ciphertext);
	/*
	 * This function decrypts an array of string with private key.
	 */
	void decrypt(SecureVector<byte>  vect_message ,PK_Decrypting_Key* key,SecureVector<byte> *plaintext);

};

#endif /* RSA_HPP_ */
